﻿@using GoodMan.Infrastructure.Entities.Entity;
@{
    ViewBag.Title = "详细信息";
    Layout = "~/Areas/WorkSpace/Views/Shared/_CollegeAdminTemplete.cshtml";
    Business bModel = ViewBag.BusinessModel;
}


@section head{
    <style type="text/css">
        .nav .active
        {
            /*background: url(<?php echo $this->img('manage_r2_c13.jpg');?>) no-repeat;*/
            background-color: #F5F5F5;
        }
        .nav .other
        {
            /* background: url(<?php echo $this->img('manage_r2_c14.jpg');?>) no-repeat;*/
            background-color: #E9E9E9;
        }
        h2.nav
        {
            border-bottom: 1px solid #B4C9C6;
            font-size: 13px;
            height: 25px;
            line-height: 25px;
            margin-top: 0px;
            margin-bottom: 0px;
        }
        h2.nav a
        {
            color: #999999;
            display: block;
            float: left;
            height: 24px;
            width: 113px;
            text-align: center;
            margin-right: 1px;
            margin-left: 1px;
            cursor: pointer;
        }
    </style>
}
<div id="content-header">
    <h1>
        添加人员</h1>
</div>
<div id="breadcrumb">
    <a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>首页</a>
    <a href="#" class="tip-bottom">商户管理</a> <a href="/workspace/collegeadmin/BusinessInfoList"
        class="current">商户信息</a> <a href="#" class="current">编辑</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-align-justify"></i></span>
                    <h5>
                        编辑商户</h5>
                </div>
                <div class="widget-content nopadding"> 
                 <form id="regform" action="" method="post" name="regform"
                    class="form-horizontal">                  
                    <div id="tab1">
                        <div class="control-group">
                            <label class="control-label">
                                商户名(*)</label>
                            <div class="controls">
                               @bModel.Name</div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                Logo</label>
                            <div class="controls">
                                
                                    <div id="container">
                                            @{
                                                if (!string.IsNullOrEmpty(bModel.Logo))
                                {
                                    string[] imageArray = bModel.Logo.Split(';');
                                    foreach (var item in imageArray)
                                    {
                                        if (item != "")
                                        {
                                           <img alt="@bModel.Name" src="@item" style="width:115px;height:95px;margin-left:10px;margin-top:10px;"/>
                                        }
                                    }
                                }
                                            }
                                            </div>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                星级</label>
                            <div class="controls">
                               @{
                                   bModel.Levels = bModel.Levels == 0 ? 1 : bModel.Levels;
                                   for (int i = 0; i < @bModel.Levels; i++)
                                   {
                                    <img src="/Content/img/star.png" />                                            
                                   }
                                        }</div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                联系方式(*)</label>
                            <div class="controls">
                                @bModel.ContactPeople
                            </div>
                        </div>  
                        <div class="control-group">
                            <label class="control-label">
                                联系方式(*)</label>
                            <div class="controls">
                                @bModel.ContactInfo
                            </div>
                        </div>                        
                    <div>
                     <div class="control-group">
                            <label class="control-label">
                                主营</label>
                            <div class="controls">
                                @bModel.MainSell
                            </div>
                        </div>
                                               
                        <div class="control-group">
                            <label class="control-label">
                                送餐时间段</label>
                            <div class="controls">  @{
                                string[] startTimeArr = bModel.DeliveryTime.Split('|');
                              string[] endTimeArr = bModel.DeliveryTimeEnd.Split('|');

                              if (startTimeArr != null && startTimeArr.Length != 0)
                              {
                                  for (int i = 0; i < startTimeArr.Length; i++)
                                  {
                                      <span>@startTimeArr[i]~@endTimeArr[i]&nbsp;&nbsp;</span>
                                  }
                              }
                                }
                                </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                地  址</label>
                            <div class="controls">
                               @bModel.Address
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                特色菜</label>
                            <div class="controls">
                                @bModel.SpecialFood
                            </div>
                        </div>
                       
                        <div class="form-actions">
                            <a href="/workspace/collegeadmin/BusinessInfoList?page=@ViewBag.page"  class="btn btn-primary btn-mini">
                                        返回</a>
                        
                                    
                                    <a href="/workspace/collegeadmin/modifybusiness?d=@bModel.Id&page=@ViewBag.page" class="btn btn-primary btn-mini">
                                        编辑</a>
                                    <a href="/workspace/collegeadmin/delbusiness?d=@bModel.Id&page=@ViewBag.page"  onclick="if (confirm('确认删除数据？删除后该数据无法恢复！')==true){return true;}else{return false;}"  class="btn btn-danger btn-mini">
                                        删除</a>
                        </div>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </div>
</div>

@section tail{
    <script type="text/javascript">
        $(function () {
            $('#likBusiness').addClass('open');
            $('#likBusiness').addClass('active');
        });
    </script>
}

